home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update17.zoo / gdb / diffs
Encoding:
Text File  |  1992-03-09  |  7.3 KB  |  356 lines

  1. *** 1.14    1992/01/29 16:45:54
  2. --- Changelo    1992/03/08 22:00:48
  3. ***************
  4. *** 173,175 ****
  5. --- 173,181 ----
  6.     always use 32 bits in expressions
  7.   
  8.   ------------------------------- Patchlevel  16 -----------------------------
  9. + main.c:: ++jrb
  10. +     make gdb -L (logging) really work. We now buffer up the output,
  11. +     open the log file when buffer fills up, dump buffer, close file
  12. +     and so on.
  13. + ------------------------------- Patchlevel  17 -----------------------------
  14. *** 1.8    1991/10/05 20:59:54
  15. --- Makefile    1992/03/08 21:07:39
  16. ***************
  17. *** 7,13 ****
  18.   
  19.   CC = $(CROSSBIN)/cgcc
  20.   # -I. for "#include <obstack.h>"
  21. ! CFLAGS = -I. -O -fomit-frame-pointer -fcombine-regs $(XFLAGS)
  22.   #LDFLAGS = -s
  23.   LDFLAGS = -v -s
  24.   
  25. --- 7,13 ----
  26.   
  27.   CC = $(CROSSBIN)/cgcc
  28.   # -I. for "#include <obstack.h>"
  29. ! CFLAGS = -I. -O -fomit-frame-pointer $(XFLAGS)
  30.   #LDFLAGS = -s
  31.   LDFLAGS = -v -s
  32.   
  33. ***************
  34. *** 111,115 ****
  35.   
  36.   TAGS: $(CFILES) $(HFILES)
  37.       -chmod +w TAGS
  38. !     /util/gnu/bin/etags -t -f $@ $^
  39.   
  40. --- 111,115 ----
  41.   
  42.   TAGS: $(CFILES) $(HFILES)
  43.       -chmod +w TAGS
  44. !     /util/gnu.old/bin/etags -t -f $@ $^
  45.   
  46. *** 1.9    1992/01/29 16:45:54
  47. --- PatchLev.h    1992/03/08 21:59:02
  48. ***************
  49. *** 1,4 ****
  50. ! #define PatchLevel "16"
  51.   
  52.   /*
  53.    *    the Patch Level above is to identify the version
  54. --- 1,4 ----
  55. ! #define PatchLevel "17"
  56.   
  57.   /*
  58.    *    the Patch Level above is to identify the version
  59. *** 1.10    1992/01/29 16:45:54
  60. --- README    1992/03/08 22:01:52
  61. ***************
  62. *** 1,3 ****
  63. --- 1,6 ----
  64. + GDB @ Patchlevel 17
  65. +     - gdb -L (logging) now always works independent of TOS etc.
  66.   GDB @ Patchlevel 16
  67.       - andreas sent a more reliable way to intut -mshort.
  68.   
  69. *** 1.5    1991/11/30 17:37:25
  70. --- gdb.texinfo    1992/03/08 22:07:03
  71. ***************
  72. *** 40,46 ****
  73.   @sp 1
  74.   @center The GNU Source-Level Debugger
  75.   @sp 4
  76. ! @center Corresponding to atariST GDB PatchLevel 14.
  77.   @sp 1
  78.   @center September 1991
  79.   @sp 5
  80. --- 40,46 ----
  81.   @sp 1
  82.   @center The GNU Source-Level Debugger
  83.   @sp 4
  84. ! @center Corresponding to atariST GDB PatchLevel 17.
  85.   @sp 1
  86.   @center September 1991
  87.   @sp 5
  88. ***************
  89. *** 549,554 ****
  90. --- 549,560 ----
  91.   is only useful if you issue it before you read the symbol--file. The preferred 
  92.   way to specify this fact is to specify the @samp{-mshort} command line 
  93.   option to gdb,ttp when you invoke it.
  94. + @item -L
  95. + @kindex logging
  96. + The @samp{-L} options turns on logging into the file @samp{gdb.log}. The file
  97. + is always appended to. All of gdb's input and output is logged to the file. The
  98. + debugees i/o is not logged here.
  99.   @end table
  100.   
  101.   While all file-specifying commands allow both absolute and relative
  102. *** 1.6    1991/11/30 17:37:25
  103. --- main.c    1992/03/08 21:52:13
  104. ***************
  105. *** 88,94 ****
  106.   #ifdef atarist
  107.   static void Save_all_vectors();
  108.   static void Restore_all_vectors();
  109. ! static volatile FILE *atari_logfile;
  110.   extern int gcc_mshort;
  111.   #endif
  112.   void really_exit();
  113. --- 88,94 ----
  114.   #ifdef atarist
  115.   static void Save_all_vectors();
  116.   static void Restore_all_vectors();
  117. ! static int atari_logfile;
  118.   extern int gcc_mshort;
  119.   #endif
  120.   void really_exit();
  121. ***************
  122. *** 220,234 ****
  123.         gcc_mshort = 1;
  124.         else if (!strcmp(argv[i], "-L"))
  125.         {
  126. !       
  127. !       if(!atari_logfile)
  128. !       {
  129. !           if(!(atari_logfile = fopen("gdb.log", "at")))
  130. !           {
  131. !           fprintf_filtered(stderr,"Failed to open logfile gdb.log\n");
  132. !           exit(1);
  133. !           }
  134. !       }
  135.         }
  136.   #endif      
  137.         else if (argv[i][0] == '-')
  138. --- 220,226 ----
  139.         gcc_mshort = 1;
  140.         else if (!strcmp(argv[i], "-L"))
  141.         {
  142. !       atari_logfile = 1;
  143.         }
  144.   #endif      
  145.         else if (argv[i][0] == '-')
  146. ***************
  147. *** 538,544 ****
  148.     {
  149.         if(atari_logfile)
  150.         {
  151. !       fprintf(atari_logfile, "%s\n", line);
  152.         }
  153.         return line;
  154.     }
  155. --- 530,536 ----
  156.     {
  157.         if(atari_logfile)
  158.         {
  159. !       append_atari_logfile(line);
  160.         }
  161.         return line;
  162.     }
  163. ***************
  164. *** 553,559 ****
  165.   
  166.     if(atari_logfile)
  167.     {
  168. !       fprintf(atari_logfile, "%s\n", line);
  169.     }
  170.     
  171.     return line;
  172. --- 545,552 ----
  173.   
  174.     if(atari_logfile)
  175.     {
  176. !       append_atari_logfile(line);
  177. !       append_atari_logfile_char('\n');
  178.     }
  179.     
  180.     return line;
  181. ***************
  182. *** 1364,1370 ****
  183.   #ifdef atarist
  184.       Restore_all_vectors();
  185.       if(atari_logfile)
  186. !     fclose(atari_logfile);
  187.   #endif
  188.       exit(n);
  189.   }
  190. --- 1357,1363 ----
  191.   #ifdef atarist
  192.       Restore_all_vectors();
  193.       if(atari_logfile)
  194. !     flush_atari_logfile();
  195.   #endif
  196.       exit(n);
  197.   }
  198. ***************
  199. *** 1378,1384 ****
  200.       va_start(argp, fmt);
  201.       if(atari_logfile)
  202.       {
  203. !     _doprnt(atari_logfile, fmt, argp);
  204.       }
  205.       return(_doprnt(fp, fmt, argp));
  206.   }
  207. --- 1371,1379 ----
  208.       va_start(argp, fmt);
  209.       if(atari_logfile)
  210.       {
  211. !     char foo[1024];
  212. !     vsprintf(foo, fmt, argp);
  213. !     append_atari_logfile(foo);
  214.       }
  215.       return(_doprnt(fp, fmt, argp));
  216.   }
  217. ***************
  218. *** 1389,1395 ****
  219.       va_start(argp, fmt);
  220.       if(atari_logfile)
  221.       {
  222. !     _doprnt(atari_logfile, fmt, argp);
  223.       }
  224.       return(_doprnt(stdout, fmt, argp));
  225.   }
  226. --- 1384,1392 ----
  227.       va_start(argp, fmt);
  228.       if(atari_logfile)
  229.       {
  230. !     char foo[1024];
  231. !     vsprintf(foo, fmt, argp);
  232. !     append_atari_logfile(foo);
  233.       }
  234.       return(_doprnt(stdout, fmt, argp));
  235.   }
  236. ***************
  237. *** 1398,1404 ****
  238.   {
  239.       if(atari_logfile)
  240.       {
  241. !     fputc(c, atari_logfile);
  242.       }
  243.       return fputc(c, fp);
  244.   }
  245. --- 1395,1401 ----
  246.   {
  247.       if(atari_logfile)
  248.       {
  249. !     append_atari_logfile_char(c);
  250.       }
  251.       return fputc(c, fp);
  252.   }
  253. ***************
  254. *** 1412,1419 ****
  255.   {
  256.       if(atari_logfile)
  257.       {
  258. !         fputs(s, atari_logfile);
  259.       }
  260.       return fputs(s, fp);
  261.   }
  262.   #endif
  263. --- 1409,1466 ----
  264.   {
  265.       if(atari_logfile)
  266.       {
  267. !     append_atari_logfile(s);
  268.       }
  269.       return fputs(s, fp);
  270.   }
  271. + #include <stddef.h>
  272. + #define BUFMAX 4096
  273. + static char abuf[BUFMAX];
  274. + static size_t  ai = 0;
  275. + append_atari_logfile(char *s)
  276. + {
  277. +     while(*s) append_atari_logfile_char(*s++);
  278. + }
  279. + append_atari_logfile_char(int c)
  280. + {
  281. +     if(c == '\n')
  282. +     append_atari_logfile_char('\r');
  283. +     
  284. +     if(ai < BUFMAX)
  285. +     abuf[ai++] = c;
  286. +     else
  287. +     {
  288. +     flush_atari_logfile();
  289. +     abuf[ai++] =c;
  290. +     }
  291. + }
  292. + flush_atari_logfile()
  293. + {
  294. +     int f = open("gdb.log", O_WRONLY | O_CREAT | O_APPEND, 0666);
  295. +     
  296. +     if((f >= __SMALLEST_VALID_HANDLE) & ai)
  297. +     {
  298. +     if(write(f, abuf, ai) != ai)
  299. +     {
  300. +         close(f);
  301. +         f = -100;
  302. +     }
  303. +     }
  304. +     if(f < __SMALLEST_VALID_HANDLE)
  305. +     {
  306. +     fprintf(stderr, "Error Writing LOGFILE, further logging disabled\n");
  307. +     atari_logfile = 0;
  308. +     }
  309. +     else
  310. +     {
  311. +     ai = 0;
  312. +     close(f);
  313. +     }
  314. + }
  315.   #endif
  316. *** 1.1    1991/05/23 03:29:22
  317. --- signal.h    1992/03/08 21:11:46
  318. ***************
  319. *** 4,20 ****
  320.    *
  321.    *  Beware the SIGINT/SIGQUIT - right now they only work when you are read()ing
  322.    *
  323. -  * $Header: /home/bammi/atari/gnu/gdb/src/RCS/signal.h,v 1.1 1991/05/23 03:29:22 bammi Exp $
  324.    *
  325.    * much hacked by jrd
  326. !  *
  327. !  * $Log: signal.h,v $
  328. !  * Revision 1.1  1991/05/23  03:29:22  bammi
  329. !  * now with gcc lib
  330. !  *
  331. !  * Revision 1.1  88/02/03  20:06:23  m68k
  332. !  * Initial revision
  333. !  * 
  334.    */
  335.   #define    NSIG        13
  336.   
  337. --- 4,12 ----
  338.    *
  339.    *  Beware the SIGINT/SIGQUIT - right now they only work when you are read()ing
  340.    *
  341.    *
  342.    * much hacked by jrd
  343. !  * further hacked by jrb
  344.    */
  345.   #define    NSIG        13
  346.   
  347.